package ShapeXmlbean.impl;

import ShapeXmlbean.ShapeType;
import ShapeXmlbean.ShapesDocument;
import ShapeXmlbean.ShapesDocument.Shapes;
import java.util.ArrayList;
import java.util.List;
import javax.xml.namespace.QName;
import org.apache.xmlbeans.SchemaType;
import org.apache.xmlbeans.impl.values.TypeStore;
import org.apache.xmlbeans.impl.values.XmlComplexContentImpl;

public class ShapesDocumentImpl extends XmlComplexContentImpl
  implements ShapesDocument
{
  private static final QName SHAPES$0 = new QName("", "shapes");

  public ShapesDocumentImpl(SchemaType paramSchemaType)
  {
    super(paramSchemaType);
  }

  public ShapesDocument.Shapes getShapes()
  {
    synchronized (monitor())
    {
      check_orphaned();
      ShapesDocument.Shapes localShapes = null;
      localShapes = (ShapesDocument.Shapes)get_store().find_element_user(SHAPES$0, 0);
      if (localShapes == null)
        return null;
      return localShapes;
    }
  }

  public void setShapes(ShapesDocument.Shapes paramShapes)
  {
    synchronized (monitor())
    {
      check_orphaned();
      ShapesDocument.Shapes localShapes = null;
      localShapes = (ShapesDocument.Shapes)get_store().find_element_user(SHAPES$0, 0);
      if (localShapes == null)
        localShapes = (ShapesDocument.Shapes)get_store().add_element_user(SHAPES$0);
      localShapes.set(paramShapes);
    }
  }

  public ShapesDocument.Shapes addNewShapes()
  {
    synchronized (monitor())
    {
      check_orphaned();
      ShapesDocument.Shapes localShapes = null;
      localShapes = (ShapesDocument.Shapes)get_store().add_element_user(SHAPES$0);
      return localShapes;
    }
  }

  public static class ShapesImpl extends XmlComplexContentImpl
    implements ShapesDocument.Shapes
  {
    private static final QName SHAPE$0 = new QName("", "shape");

    public ShapesImpl(SchemaType paramSchemaType)
    {
      super(paramSchemaType);
    }

    public ShapeType[] getShapeArray()
    {
      synchronized (monitor())
      {
        check_orphaned();
        ArrayList localArrayList = new ArrayList();
        get_store().find_all_element_users(SHAPE$0, localArrayList);
        ShapeType[] arrayOfShapeType = new ShapeType[localArrayList.size()];
        localArrayList.toArray(arrayOfShapeType);
        return arrayOfShapeType;
      }
    }

    public ShapeType getShapeArray(int paramInt)
    {
      synchronized (monitor())
      {
        check_orphaned();
        ShapeType localShapeType = null;
        localShapeType = (ShapeType)get_store().find_element_user(SHAPE$0, paramInt);
        if (localShapeType == null)
          throw new IndexOutOfBoundsException();
        return localShapeType;
      }
    }

    public int sizeOfShapeArray()
    {
      synchronized (monitor())
      {
        check_orphaned();
        return get_store().count_elements(SHAPE$0);
      }
    }

    public void setShapeArray(ShapeType[] paramArrayOfShapeType)
    {
      synchronized (monitor())
      {
        check_orphaned();
        arraySetterHelper(paramArrayOfShapeType, SHAPE$0);
      }
    }

    public void setShapeArray(int paramInt, ShapeType paramShapeType)
    {
      synchronized (monitor())
      {
        check_orphaned();
        ShapeType localShapeType = null;
        localShapeType = (ShapeType)get_store().find_element_user(SHAPE$0, paramInt);
        if (localShapeType == null)
          throw new IndexOutOfBoundsException();
        localShapeType.set(paramShapeType);
      }
    }

    public ShapeType insertNewShape(int paramInt)
    {
      synchronized (monitor())
      {
        check_orphaned();
        ShapeType localShapeType = null;
        localShapeType = (ShapeType)get_store().insert_element_user(SHAPE$0, paramInt);
        return localShapeType;
      }
    }

    public ShapeType addNewShape()
    {
      synchronized (monitor())
      {
        check_orphaned();
        ShapeType localShapeType = null;
        localShapeType = (ShapeType)get_store().add_element_user(SHAPE$0);
        return localShapeType;
      }
    }

    public void removeShape(int paramInt)
    {
      synchronized (monitor())
      {
        check_orphaned();
        get_store().remove_element(SHAPE$0, paramInt);
      }
    }
  }
}

/* Location:           C:\Users\Administrator\Desktop\奥特百叶窗\Shutter DesignerV3.1\CurtainDesign.jar
 * Qualified Name:     ShapeXmlbean.impl.ShapesDocumentImpl
 * JD-Core Version:    0.6.0
 */